package org.rslai.autotest.core.page.impl;

import org.openqa.selenium.Keys;

/**
 * 保存键盘操作信息
 * @author rslai
 *
 */
public class KeyOperation {
	public static final int KEY_DOWN = 1;
	public static final int KEY_UP = 2;
	public static final int SENDKEYS = 3;

	private int type;
	private Keys key;
	
	/**
	 * 构造函数
	 * @param type 操作类型（KeyOperation.KEY_DOWN、KeyOperation.KEY_UP、KeyOperation.KEY_PRESS、KeyOperation.SENDKEYS）
	 * @param key 指定键
	 */
	public KeyOperation(int type, Keys key) {
		this.type =type;
		this.key = key;
	}

	public int getType() {
		return this.type;
	}
	
	public Keys getKey() {
		return key;
	}

}
